< previous page page_684 next page >

Page 684
When you use a forward-only cursor, ADO doesnt need to know the column typeit just needs the data type and size. Also, it doesnt need to retrieve any bookmarks; it just goes through the resultset of data one time as opposed to two times.
Forward Only Versus Dynamic
A forward-only recordset is faster to open than a dynamic recordset. A dynamic recordset is the worst performing of any of the recordset types, so you should always avoid this type of cursor. A dynamic cursor takes so much time to open because it has to request a lock on every row it reads. It also maintains those locks until every page is read from the resultset. This takes a lot of extra time, and it also drags down the performance of your database server.
Keyset Versus Dynamic
A keyset is slightly better than a dynamic recordset in terms of getting the initial recordset built. Therefore, if you must use a fully scrollable recordset, use a keyset type.
Use an Image Control Instead of a Picture Control
The picture control has more overhead than the image control; therefore, you should always use the image control when you just need to display a graphic. Use the picture control when you need to contain other controls or align the picture either to the top or bottom. You should also use the picture control when you need to use some graphic methods. Using the image control optimizes both for speed and size.
Set the ClipControls Property to False
Clipping refers to the process Windows performs to determine what part of a control it needs to repaint after you move a form to become visible. By setting the ClipControls property to False, you can significantly reduce the time it takes forms to repaint, because only the area covered is repainted, not the entire form. The default is True, so youll need to explicitly change this one. If youre using graphic methods, however, you may not be able to do this. This property applies to forms, frames, and picture controls.

 
< previous page page_684 next page >

If you like this book, buy it!